package com.byyy.ccts.modules.ysjl;

import com.byyy.ccts.core.utils.StringUtils;

import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;

/**
 * @projectName: TODO
 * @package: com.byyy.ccts.modules.ysjl
 * @className: YsjlGlobal
 * @description: TODO
 * @author: LYB
 * @Date: 2023/9/5 21:21
 * @updateUser: LYB
 * @updateDate: 2023/9/5 21:21
 * @updateRemark:
 * @version: v1.0
 */
public class YsjlGlobal {

    public static int SCORE_PER_ACTIVITY = 5;

    public static String[] FLOW_DEFAULT = new String[] {
            "请提前10分钟到场地热身，对拉，尽量热开身",
            "进行双人对抗，两局结束，请不要霸占场地",
            "活动结束后，有序离场，记得停车扫码，后续进行群收款",
            "祝打球愉快，身体健康"
    };

    public static String[] PIC_DEFAULT = new String[] {
            "http://ccc.baheal.com/byyyccctest/static/ysjl/1.jpg",
            "http://ccc.baheal.com/byyyccctest/static/ysjl/2.jpg",
            "http://ccc.baheal.com/byyyccctest/static/ysjl/3.jpg",
            "http://ccc.baheal.com/byyyccctest/static/ysjl/4.jpg",
    };

    public static Map<String, String> PARTNER = new HashMap<String, String>(){{
        // 尚+兑
        put("60e78dfdecc4472b941933fa5eb95ba2","5237ac1b71f24fba86abdc481aadeb84");
        put("5237ac1b71f24fba86abdc481aadeb84","60e78dfdecc4472b941933fa5eb95ba2");
        // 白+霖
        put("7416a7073c67411f85c8c5514d1d2855","6ba1cde0fb0b49aab5ca75f3c8ba8105");
        put("6ba1cde0fb0b49aab5ca75f3c8ba8105","7416a7073c67411f85c8c5514d1d2855");
        // 头哥+徐老师
        put("6ecd95829fb44b4599a191524ce1637a","150f26327e3643799c5ddab51ff8e185");
        put("150f26327e3643799c5ddab51ff8e185","6ecd95829fb44b4599a191524ce1637a");
    }};

    public static Map<Integer, Integer> RANK_SCORE_MAP = new HashMap<Integer, Integer>(){{
        put(1, 30);
        put(2, 30);
        put(3, 30);
        put(4, 50);
        put(5, 80);
    }};

    public static String[] WEEK = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};

    public static String[] ROCKET_LEVEL = {"普通级", "精良级", "稀有级", "史诗级", "传说级", "神话级"};

    public static String encodeName(String name) {
        if (StringUtils.isEmpty(name)) {
            return "";
        }
        String encodeName = null;
        try {
            encodeName = URLEncoder.encode(name, "UTF-8");
            return encodeName;
        } catch (Exception e) {
            return name;
        }
    }

    public static String decodeName(String name) {
        if (StringUtils.isEmpty(name)) {
            return "";
        }
        String decodeName = null;
        try {
            decodeName = URLDecoder.decode(name, "UTF-8");
            return decodeName;
        } catch (Exception e) {
            return name;
        }
    }
}
